import request from '@/utils/requestH2'

/* 项目录入 */

// 项目列表查询
export function selProjectListApi(params) {
  return request({
    url: '/projectInput/project/selProjectList',
    method: 'GET',
    params
  })
}

// 新增项目
export function addProjectApi(data) {
  return request({
    url: '/projectInput/project/addProject',
    method: 'POST',
    data
  })
}

// 编辑项目
export function updateProjectByIdApi(data, id) {
  return request({
    url: `/projectInput/project/updateProjectById/${id}`,
    method: 'PUT',
    data
  })
}

// 根据ids删除项目
export function delProjectByIdsApi(data) {
  return request({
    url: '/projectInput/project/delProjectByIds',
    method: 'DELETE',
    data
  })
}

// 根据id查询项目详情
export function selProjectByIdApi(id) {
  return request({
    url: `/projectInput/project/selProjectById/${id}`,
    method: 'GET'
  })
}

// 获取最新项目编号
export function selNewProjectNoApi() {
  return request({
    url: '/projectInput/project/selNewProjectNo',
    method: 'GET'
  })
}

/* 项目结案 */

// 项目结案列表查询
export function selCaseListApi(params) {
  return request({
    url: '/endCase/case/selCaseList',
    method: 'GET',
    params
  })
}

// 根据id进行项目办结
export function addEndCaseApi(data) {
  return request({
    url: '/endCase/case/addEndCase',
    method: 'POST',
    data
  })
}
